/* Replication Data for "Bloody Pasts and Current Politics: The Political Legacies of Violent Resettlement" (Comparative Political Studies, 2023) */
/* Amiad Haran Diman and Dan Miodownik */
/* June 2023 */

***** MAIN RESULTS *****
use BPCP_replication_electoral.dta

***** Section 6.1

** OLS results:

* Full sample
reg rightshare displacer

* Moshavim
reg rightshare displacer if orgassoc==1

* Kibutzim
reg rightshare displacer if orgassoc==15

** CEM results

*(ssc install cem)

* Full sample
cem orgassociationcbs napacbs elexyear cbsvilltype index17, treatment (displacer) 

reg rightshare displacer [iweight=cem_weights] 

* Moshavim
cem napacbs elexyear cbsvilltype index17, treatment (displacer) 

reg rightshare displacer [iweight=cem_weights]  if orgassoc==1

* Kibutzim
reg rightshare displacer [iweight=cem_weights]  if orgassoc==15


***** Section 6.2 

*** Distance to remains

reg rightshare log_re i.orgassociationcbs i.napacbs i.knesset i.cbsvilltype index17

*** Visibility of remains

** OLS results:

* Totally destroyed
reg rightshare oblivirated 

* Rubble or Structure
reg rightshare uninhabitat_remains 

* Remains Inhabited
reg rightshare living 

** CEM:

* Totally destroyed
 cem orgassociationcbs napacbs elexyear cbsvilltype index17, treatment(displacer)
 reg rightshare oblivirated [iweight=cem_weights]

* Rubble or Structure
reg rightshare uninhabitat_remains [iweight=cem_weights]

* Remains Inhabited
reg rightshare living [iweight=cem_weights]


***** Section 6.3

*** Contact

cem orgassociationcbs napacbs elexyear cbsvilltype index17, treatment (displacer) 

reg rightshare displacer##c.log_PCI [iweight=cem_weights]

reg rightshare log_PCI [iweight=cem_weights] if displacer==1

reg rightshare log_PCI [iweight=cem_weights] if displacer==0


***** Section 6.4 

*** Direct violence

** Between Groups

*OLS:
reg rightshare violentdisplacement_nm 

*CEM:
cem orgassociationcbs napacbs elexyear cbsvilltype index17 if violentdisplacement_nm!=., treatment (violentdisplacement_nm) 
reg rightshare violentdisplacement_nm [iweight=cem_weights]

** Within Groups

*OLS:
reg rightshare violentdisplacement

*CEM:
cem orgassociationcbs napacbs elexyear cbsvilltype index17 if violentdisplacement!=., treatment (violentdisplacement) 
reg rightshare violentdisplacement [iweight=cem_weights]

*** Number of victims 

** Refugees

*OLS:
reg rightshare std_refugees 

*CEM:
cem orgassociationcbs napacbs elexyear cbsvilltype index17, treatment (displacer) 

reg rightshare std_refugees [iweight=cem_weights]

** Population

*OLS:
reg rightshare std_pop45 

*CEM:
reg rightshare std_pop45 [iweight=cem_weights]
